Skip to content

Honor workspace-write sandbox config on every turn - #368

Open
Greg-Moskalenko wants to merge 4 commits into
agentclientprotocol:mainfrom
Greg-Moskalenko:fix/workspace-write-network-config
Open

Honor workspace-write sandbox config on every turn#368
Greg-Moskalenko wants to merge 4 commits into
agentclientprotocol:mainfrom
Greg-Moskalenko:fix/workspace-write-network-config

Conversation

@Greg-Moskalenko

@Greg-Moskalenko Greg-Moskalenko commented Aug 5, 2026

Copy link
Copy Markdown

What changed

  • preserve explicit sandbox_workspace_write.network_access = true when codex-acp builds each workspace-write turn policy
  • merge explicit absolute sandbox_workspace_write.writable_roots into that same per-turn policy, with exact deduplication
  • preserve on-request approvals, ACP additional directories, and the existing temporary-directory flags
  • leave read-only and full-access modes unchanged; ignore malformed, non-string, and non-absolute configured roots
  • advertise the workspace-write extension alongside upstream's goal extension metadata

Why

codex-acp passes a mode-specific sandbox policy on every turn. The default Agent mode hardcodes networkAccess: false and an empty root list, so it overrides a caller's valid session-level workspace-write network and root configuration. A client can therefore create a correctly configured thread but receive turns that lack both its requested network access and isolated writable roots.

This change carries only the explicit workspace-write settings into the per-turn workspace-write policy. It does not select danger-full-access, widen another mode, or alter the approval policy.

Upstream reconciliation

Merged current upstream main (61de42d, v1.1.10) into the PR branch. The two adjacent metadata conflicts were resolved by retaining both upstream _meta.goal and this PR's _meta.codex.workspaceWriteConfig fields. Exact head: 71d77db55a53c915cd9dce4247271f0c5d5f6054.

Validation

At exact head 71d77db55a53c915cd9dce4247271f0c5d5f6054:

  • npm run typecheck
  • npm test (38 files passed, 6 skipped; 353 tests passed, 28 skipped)
  • npm run bundle:all (Linux x64/arm64, macOS x64/arm64, Windows x64/arm64)
  • independent read-only conflict review: no findings

npm run test:e2e completed its build step but the live fixtures could not start in this environment because neither CODEX_API_KEY nor OPENAI_API_KEY is present.

Co-authored-by: Greg Moskalenko <greg1mosk@gmail.com>
Signed-off-by: Greg Moskalenko <greg1mosk@gmail.com>
@Greg-Moskalenko
Greg-Moskalenko marked this pull request as ready for review August 5, 2026 21:31
Co-authored-by: Greg Moskalenko <greg1mosk@gmail.com>
Signed-off-by: Greg Moskalenko <greg1mosk@gmail.com>
@Greg-Moskalenko Greg-Moskalenko changed the title Honor workspace-write network config on every turn Honor workspace-write sandbox config on every turn Aug 5, 2026
Co-authored-by: Greg Moskalenko <greg1mosk@gmail.com>
Signed-off-by: Greg Moskalenko <greg1mosk@gmail.com>
Co-authored-by: Greg Moskalenko <greg1mosk@gmail.com>
Signed-off-by: Greg Moskalenko <greg1mosk@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant